<?php
$this->sendDebugMessage("checkUno model start");

$prevPlayer = getPrevPlayer($tb);
$seat = $tb->seatList[$prevPlayer];

if(count($seat->cardList) == 1 && !$seat->uno)
{
	//没有uno
	//通知受罚人
	$punishUser = $this->userCenter->userList[$seat->userID];
	
	$pcard = getPunishCard($tb,$punishUser);
	
	$response = new Response();
	$response->event = "SE_UNO_PUNISH";
	$response->body = '{"userID":"'.$punishUser->userID.'","seatID":"'.$prevPlayer.'","card":["'.implode("\",\"",$pcard).'"]}';
	$this->sendData($punishUser->userID,$response);
	
	$response->event = "SE_UNO_PUNISH_UPDATE";
	$response->body = '{"userID":"'.$punishUser->userID.'","seatID":"'.$prevPlayer.'","card":'.count($pcard).'}';
	$this->broadcastGroup($response,$this->userCenter->roomList[$user->roomID]->tableList[$user->tableID]->getUserList(),array($punishUser->userID));
}
$this->sendDebugMessage("checkUno model end");